import React, { useEffect } from 'react'

export default function Children() {
    useEffect(()=>{
        //清除函数
        let timmer = setInterval(()=>{
            console.log(123);
        },1000)
        return ()=>{
            console.log("componentWillUnmount");
            clearInterval(timmer)
        }
    },[])

    return (
        <div>Children</div>
    )
}
